package com.ndp.fb.rdb.db.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.ndp.fb.rdb.api.AdMarketTargetCountryRdbService;
import com.ndp.fb.rdb.db.DaoTemplate;
import com.ndp.fb.rdb.db.impl.mapper.DefaultRowMapper;
import com.ndp.fb.rdb.model.AdTitleHistory;
import com.ndp.fb.rdb.model.autocreatead.AdMarketTargetCountry;

import java.util.List;

/**
 * Created by Elvis on 2016/6/20.
 */
@Service
public class AdMarketTargetCountryRdbServiceImpl extends DaoTemplate implements AdMarketTargetCountryRdbService {
    @Override
    public Long save(AdMarketTargetCountry adMarketTargetCountry) {
        return null;
    }

    @Override
    public List<AdMarketTargetCountry> getAdMarketTargetCountry() {
        String sql = "select * from ad_market_target_country where status = ?";
        return getJdbcTemplate().query(sql, new Object[]{1}, DefaultRowMapper.autoRowMapper(AdMarketTargetCountry.class));
    }
}
